<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class BilibiliVideo extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('bilibili_videos', function (Blueprint $table) {
            $table->unsignedInteger('id',1);
            $table->string('aid')->comment('aid')->index();
            $table->string('title')->comment('标题');
            $table->string('desc','800')->comment('描述');
            $table->string('pic',500)->comment('封面');
            $table->unsignedInteger('page_count')->default(0)->comment('已经下载的集数');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('bilibili_videos', function (Blueprint $table) {
            //
        });
    }
}
